package mrusanov.util

import java.util.{Calendar, Date}

object DateUtil {
  def dateOnly(date:Date):Date = {
    val calendar = Calendar.getInstance()
    calendar.setTime(date)
    calendar.clear(Calendar.HOUR_OF_DAY)
    calendar.clear(Calendar.MINUTE)
    calendar.clear(Calendar.SECOND)
    calendar.clear(Calendar.MILLISECOND)
    calendar.getTime
  }
}
